package pl.edu.agh.gronoMining.frequentSubgraphFinder.frequentSearcher.subgraph;

import pl.edu.agh.gronoMining.frequentSubgraphFinder.graph.Node;

/**
 * Represents one 'move'. Move is extension of subgraph by adding one edge between existing subgraph nodes
 * or adding an edge and new node to subgraph. <br /><br />
 * Move consist move type, fromNodeId which is id of first node in new edge and tonodeId which is id of 
 * second node in this edge. It also has additional argument (int). Move can also be a path extension,
 * which means that after this move graph will be a path. Last thing move contains is id of original to node
 * (used by subgraph that created this move).
 */
public interface SubgraphMove {

	public static final int ADD_EDGE = 1;
	public static final int ADD_NODE_AND_EDGE = 2;
	
	/**
	 * @return type of move
	 */
	public int getType();
	
	/**
	 * @return formNodeId
	 */
	public int getFromNodeId();
	
	/**
	 * @return toNodeId
	 */
	public int getToNode();
	
	/**
	 * @return additional move argument
	 */
	public int getAdditionalArg();
	
	/**
	 * @return true if after this move subgraph is path
	 */
	public boolean isCreatingPath();
	
	/**
	 * @return true if before this move subgraph was path
	 */
	public boolean wasPath();
	
	/**
	 * set original toNodeId
	 * @param toNode toNodeId
	 */
	public void setOrgToNode(Node toNode);
	
	/**
	 * @return original node id
	 */
	public Node getOrgToNode();
	
}
